﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GameManager : MonoBehaviour {

    public static int GAMRSTATE_MENU = 0;
    public static int GAMRSTATE_PLAYING = 1;
    public static int GAMRSTATE_END = 2;

    public Transform firstBg;

    public int score = 0;
    public int GameState = GAMRSTATE_MENU;

    public static GameManager instance;

    private GameObject bird;

    private void Awake()
    {
        instance = this;
        bird = GameObject.FindGameObjectWithTag("Player");
    }

    private void Update()
    {
        if (GameState == GameManager.GAMRSTATE_MENU)
        {
            if (Input.GetMouseButton(0))
            {
                GameState = GameManager.GAMRSTATE_PLAYING;
                bird.SendMessage("GetLife");

            }
        }
    }


}
